< previous page page_21 next page >

Page 21
0021-02.jpg
Figure 2.4.
An example of a one-to-one relationship between tables.
You use pointer fields to point to one or more records in other tables that have related information. Pointer fields usually describe what are known as one-to-many relationships. A good example of a one-to-many relationship is the relationship between a single customer master record and several outstanding customer orders (see Figure 2.5).
0021-01.jpg
Figure 2.5.
An example of a one-to-many relationship between tables.
One-to-One Relationships
One-to-one relationships are used to link records in a master table (such as the Customer Table) to a single related record in another table.
For example, assume you have two types of customers in your Company Database: retail and wholesale. Retail customers get paid commissions on sales, so you need to add a Commission field to the Customers table. Wholesale customers, however, purchase their products at a discount, so you also need to add a Discount field to the Customers table. Now your database users have to remember that, for Retail customers, the Discount field must be left empty, and

 
< previous page page_21 next page >

If you like this book, buy it!